<template>
    <div class=''>
        我是子组件2
        <button @click="obClick">点击向父组件传参</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            obj: {
                name: "zs"
            }
        };
    },
    components: {

    },
    created() {

    },
    mounted() {

    },
    methods: {
        obClick() {
            this.$emit("getData", this.obj)
        }
    },
};
</script>

<style lang='scss' scoped>
.v-enter,
.v-leave-to {
    opacity: 0;
    transform: translate(30px);
}

.v-enter-active,
.v-leave-active {
    position: absolute;
    transition: all 0.3s ease;
}
</style>